﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


namespace PersistentObject.Common.Attributes
{
    /// <summary>
    /// Indicate a class or a property to persist with given name
    /// </summary>
    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property, Inherited = false)]
    public class PersistAttribute : Attribute
    {
        /// <summary>
        /// Indicate the name to be persist with
        /// </summary>
        public string Name { get; private set; }
        /// <summary>
        /// The constructor of Persist attribute which requires a name
        /// </summary>
        /// <param name="name"></param>
        public PersistAttribute(string name)
        {
            Name = name;
        }
    }
}
